Ext.define('Admin.view.main.ResetForm', {
    extend: 'Ext.form.Panel',
    alias: 'widget.ResetForm',
    requires: [],
    controller: 'main',
    //cls: '',

    layout: {
        type:'vbox',
        align:'stretch'
    },

    bodyPadding: 10,
    scrollable: true,

    defaults: {
        labelWidth: 60,
        labelSeparator: ''
    },

    items: [ {  
              xtype:"textfield",
              id : 'newPwd1',
              name : 'newPwd',
              width : 140,
              inputType : 'password',
              fieldLabel : '<font color="red">新 密 码</font>',
              allowBlank : false,
              blankText : '新密码不能为空',
              regex : /^[\s\S]{0,12}$/,
              regexText : '新密码长度不能超过12个字符'
          }, {
              xtype:"textfield",
              name : 'confirmPwd',
              width : 140,
              id : 'newPwd2',
              inputType : 'password',
              fieldLabel : '<font color="red">确认密码</font>',
              initialPassField : 'newPwd',
              allowBlank : false,
              blankText : '确认密码不能为空',
              regex : /^[\s\S]{0,12}$/,
              regexText : '旧密码长度不能超过12个字符'
          }],

    bbar: {
        overflowHandler: 'menu',
        items: ['->',{
            xtype: 'button',
            ui: 'soft-green',
            text: '提交',
            handler : 'submitResetForm'
        },{
            xtype: 'button',
            ui: 'soft-red',
            text: '取消',
          handler :function(bt){
            var win = bt.up('window');
            if (win) {
                win.close();
            }
          }
        },'->']
    }
});